package kr.co.doriclassic.powerjava.chapter07;

public class Car {
	/*@Override
	public String toString() {
		System.out.println("toString() method call");
		return super.toString();
	}*/

	

	private String color;
	
	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	private int speed;
	public int getSpeed() {
		return speed;
	}

	public void setSpeed(int speed) {
		this.speed = speed;
	}

	public int getGear() {
		return gear;
	}

	public void setGear(int gear) {
		this.gear = gear;
	}

	private int gear;
	
	public Car() {
		super();
		// TODO Auto-generated constructor stub
	}

	public Car(String color, int speed, int gear) {
		super();
		this.color = color;
		this.speed = speed;
		this.gear = gear;
	}

	@Override
	public String toString() {
		return "Car [color=" + color + ", speed=" + speed + ", gear=" + gear
				+ "]";
	}
/*	public void print(){
		System.out.printf("차의 색깔은 %s, 속도는 %d, 기어는 %d 단입니다.", color, speed, gear);
	}*/
}
